package com.ksd.service.impl;

import com.ksd.dao.IUserDAO;
import com.ksd.pojo.User;
import com.ksd.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private IUserDAO userDAO;

    @Override
    public User getUserMessage(String name) {
        return userDAO.getUserByName(name);
    }

    @Override
    public boolean verifyLogin(User user) {
        return userDAO.isValid(user.getUsername(), user.getPassword());
    }
}
